package com.hq.service;

import com.hq.bean.City;
import com.hq.bean.User;
import com.hq.dao.UserDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class UserServiceImpl implements UserService{
    @Resource
    private UserDao dao;

    @Override
    public int login(String name, String password) {
        return dao.login(name,password);
    }

    @Override
    public List<User> list(Map map) {
        return dao.list(map);
    }

    @Override
    public List<City> city(Integer pid) {
        return dao.city(pid);
    }

    @Override
    public int add(User user) {
        return dao.add(user);
    }

    @Override
    public User getById(Integer id) {
        return dao.getById(id);
    }

    @Override
    public int upd(User user) {
        return dao.upd(user);
    }
}
